#!/bin/bash
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# r31a.hsc src/install/postinstall 1.2 
#  
# IBM CONFIDENTIAL 
#  
# OBJECT CODE ONLY SOURCE MATERIALS 
#  
# (C) COPYRIGHT International Business Machines Corp. 2000,2002 
# All Rights Reserved 
#  
# The source code for this program is not published or otherwise 
# divested of its trade secrets, irrespective of what has been 
# deposited with the U.S. Copyright Office. 
#  
# IBM_PROLOG_END_TAG 


# since this is a re-occuring porblem, make sure /usr/websm/codebase has
# correct permissions

chmod 777 /usr/websm/codebase

#create symbolic links to commandline access control controller
if [ ! -f /opt/hsc/bin/chcuod ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/chcuod 
fi

if [ ! -f /opt/hsc/bin/chhwres ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/chhwres
fi

if [ ! -f /opt/hsc/bin/get_cec_mode ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_cec_mode
fi

if [ ! -f /opt/hsc/bin/get_cec_mtms ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_cec_mtms
fi

if [ ! -f /opt/hsc/bin/get_cec_state ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_cec_state
fi
if [ ! -f /opt/hsc/bin/get_cec_version ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_cec_version
fi
if [ ! -f /opt/hsc/bin/get_op_panel ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_op_panel
fi
if [ ! -f /opt/hsc/bin/get_partition_state ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/get_partition_state
fi

if [ ! -f /opt/hsc/bin/lshwres ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/lshwres
fi

if [ ! -f /opt/hsc/bin/power_off_cec ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/power_off_cec
fi

if [ ! -f /opt/hsc/bin/power_on_cec ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/power_on_cec
fi
if [ ! -f /opt/hsc/bin/query_cecs ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/query_cecs
fi
if [ ! -f /opt/hsc/bin/query_partition_names ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/query_partition_names
fi

if [ ! -f /opt/hsc/bin/query_profile_names ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/query_profile_names
fi
if [ ! -f /opt/hsc/bin/rsthwres ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/rsthwres
fi
if [ ! -f /opt/hsc/bin/reset_partition ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/reset_partition
fi
if [ ! -f /opt/hsc/bin/start_partition ]
then
  ln -s /opt/hsc/bin/commandcontrol /opt/hsc/bin/start_partition
fi

sed 's/^[ ][ ]*HorizSync[ ][ ]*[0-9][0-9]*.-.[0-9][0-9]*/     HorizSync 31.5 - 57.0/g' /etc/X11/XF86Config >/tmp/XF86Config
cp /tmp/XF86Config /etc/X11/XF86Config
sed 's/^[ ][ ]*HorizSync[ ][ ]*[0-9][0-9]*.-.[0-9][0-9]*/     VertRefresh 50 - 70/g' /etc/X11/XF86Config >/tmp/XF86Config
cp /tmp/XF86Config /etc/X11/XF86Config

sed 's/^[ ][ ]*HorizSync[ ][ ]*[0-9][0-9]*.-.[0-9][0-9]*/     HorizSync 31.5 - 57.0/g' /etc/X11/XF86Config-4 >/tmp/XF86Config
cp /tmp/XF86Config /etc/X11/XF86Config-4
sed 's/^[ ][ ]*HorizSync[ ][ ]*[0-9][0-9]*.-.[0-9][0-9]*/     VertRefresh 50 - 70/g' /etc/X11/XF86Config-4 >/tmp/XF86Config
cp /tmp/XF86Config /etc/X11/XF86Config-4
rm -f /tmp/XF86Config

mount /mnt/upgrade
if [ -f /mnt/upgrade/iqybcrit.dat ]
then
   rm -f /mnt/upgrade/iqybcrit.dat
fi
umount /mnt/upgrade
